package servicesImp.upms;


import base.IBaseMapperWithoutBLOBs;
import base.IBaseServicesWithoutBLOBsImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import services.upms.PermissionRoleServices;
import wt.dao.upms.PermissionRoleMapper;
import wt.entity.upms.PermissionRole;
import wt.entity.upms.PermissionRoleExample;
import wt.staticData.TableName;

import java.util.List;


/**
 * Created by Administrator on 2017/9/7.
 */
@Service
public class PermissionRoleServicesImp extends IBaseServicesWithoutBLOBsImpl<PermissionRole, PermissionRoleExample> implements PermissionRoleServices {

    @Autowired
    PermissionRoleMapper permissionRoleMapper;


    @Override
    public IBaseMapperWithoutBLOBs<PermissionRole, PermissionRoleExample> getMapper() {
        return permissionRoleMapper;
    }

    @Override
    public String getTableName() {
        return TableName.UPMS_PERMISSION_ROLE;
    }


    public List<PermissionRole> selectByRoleId(String roleId) throws Exception {
        PermissionRoleExample permissionRoleExample = new PermissionRoleExample();
        permissionRoleExample.createCriteria().andRoleIdEqualTo(roleId);
        return selectByExample(permissionRoleExample);
    }
}
